$(function(){
	getGenerateFolderList();
})

function getGenerateFolderList(){
	$.ajax({
		type:"post",
		url:"http://localhost:8082/phr-scan/generate/getGeneratorFolderList",
		success:function(data){
			if(data!=null){
				var html="";
				for(var i in data){
					var folder=data[i];
					html+="<tr>"+
					  " <td class='tdLabel_5'>"+(parseInt(i)+1)+"</td>"+
					  "	<td class='tdLabel_5'>"+(folder.createMan==undefined?'':folder.createMan)+"</td>"+
					  "	<td class='tdLabel_5'>"+(folder.folderName==undefined?'':folder.folderName)+"</td>"+
					  "	<td class='tdLabel_5'>"+(folder.createTime==undefined?'':folder.createTime)+"</td>"+
					  "	<td class='tdLabel_5'>"+(folder.status==1?'未使用':'已使用')+"</td>"+
					  " <td class='tdLabel_5'><a class='int' status='"+folder.status+"'  onclick='medQuality(this)' folderName='"+folder.folderName+"' >质控</a></td>"+
					  "</tr>";
				}
				$("#tbody").html(html);
			}
		}
	})
}


//病案质控
function medQuality(obj){
	var $this=$(obj);
	var status=$this.attr("status");
	var folderName=$this.attr("folderName");
	if(status==2 || status==4){
		alert("此病案已质控!");
		return;
	}
	
	window.location.href='http://localhost:8082/phr-scan/quality/detailControl?folderName='+folderName;
}